Home > Use Cases > Restoring a VM

Restoring a VM

A sample SessionToken will be used throughout this use case.
The sample SessionToken will be: e65aedeb-a0e7-440c-8309-1cc0bcd920db

Restoring a VM requires various parameters which can be retrieved from other calls. Hence, some prior calls need to be requested before a restore operation can be requested. The only parameter which is required before making the other calls is the BackupLocationId, which can be retrieved as described in its appropriate section further above in this document. The following list describes the required parameters and from which call can they be retrieved.

  • http://localhost:35113/api/restore-options/available-versions/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e/e52edf12-a762-4602-a6d7-bc2386321b84
    • HypervisorVirtualMachineUuid
    • RestoreFromLocationId (This is located in the request which has just been made, or in this call, under the heading BackupLocationId. These should always be the same.)
    • RestoreBackupVersion: One of the values in Versions
    • OriginalVirtualMachineName
    • BackupFolderPath:
  • http://localhost:35113/api/restore-options/available-versions/e65aedeb-a0e7-440c-8309-1cc0bcd920db
    • RestoreToAltaroHostId: Located in AltaroHostId
  • VMware Only
    http://localhost:35113/api/restore-options/available-datastores/e65aedeb-a0e7-440c-8309-1cc0bcd920db/1013330d-dd91-4be9-b463-fe4c3152ef6b

The rest of the parameters have to be provided at this stage, and not from any prior calls. These parameters are the following:

  • RestoreToLocation: In the case of HyperV, this is the file system path where the restore is going to be stored. In the case of VMware, this is the datastore name. Datastores for a particular host can be retrieved using the available-datastores call mentioned above.
  • RestoreVirtualMachineName: The new name of the virtual machine to be restored.
  • DisableNicOnRestoreVirtualMachine: Whether to disable the NIC card for the restored virtual machine. In most scenarios, this is ideally set to true in order to avoid IP conflicts.
  • DecryptionKey: For encrypted backups, the decryption key must be provided. This is optional and is only required for encrypted backups.

To restore from an Altaro Backup Server, simply provide the offsite BackupLocationId of the Altaro Backup Server in question, and provide the Decryption Key, since offsite backups are always encrypted.

To monitor the activity and results of the operation, refer to the Take Backup operation above.

 

Note: A full list of available API commands can be found here